package com.pmy.dao;

import com.pmy.pojo.Provider;
import com.pmy.pojo.User;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

public interface  ProviderMapper {
    //    根据供应商编码或供应商名称查询用户
    List<Provider> queryAll(Map<String,Object> map);

    //   根据条件查询供应商总数
    int getProviderCount(Map<String,Object> map);

    //    根据id查询一条数据
    @Select("select * from `smbms`.`smbms_provider` WHERE `id` = #{id}")
    Provider getProviderById(int id);

    //    添加一条数据
    int addProvider(Map<String, Object> map);

    //    删除一条数据
    @Delete("DELETE FROM `smbms`.`smbms_provider` WHERE `id` = #{id}")
    int deleteProviderById(int id);

    //    修改一条数据
    int updateProviderById(Map<String,Object> map);

    //获取全部供应商
    List<String> getProviderName();
}
